<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>单位工程质量评定表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/lib/layui/css/layui.css">
    <link rel="stylesheet" href="/statics/layui/font/font.css" media="all"/>
    <link rel="stylesheet" href="/static/css/weadmin.css">
    <style type="text/css">
        html, body {
            height: 100%;
        }

        .chooseBox {
            border: 1px solid #333;
            height: 300px;
            padding: 10px;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
            overflow-y: auto;
        }

        .leftBox > p {
            line-height: 30px;
            padding-left: 20px;
            cursor: pointer;
        }

        .leftBox > p:hover {
            background: #ddd;
        }

        .leftBox > p.selected {
            background: #d5d5d5;
        }
    </style>
</head>
<body>
<div class="layui-fluid" style="height:100%;">
    <form class="layui-form" lay-filter="formData" style="margin-top: 10px;">
        <input type="hidden" name="cptId" class="formData">
        <input type="hidden" name="id" class="formData">
        <div class="layui-form-item">
            <label class="layui-form-label required">单位工程名称：</label>
            <div class="layui-input-block">
                <input type="text" name="unitPrjName" lay-verify="required" placeholder="单位工程名称" autocomplete="off"
                       class="layui-input formData"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">分部工程评定：</label>
            <div class="layui-input-block">
                共有部分
                <input type="text" name="partNum" lay-verify="required" placeholder="请输入整数" autocomplete="off" oninput="value=value.replace(/[^\d]/g,'')"
                       class="layui-input formData"/>
            </div>
            <div class="layui-input-block">
                其中符合要求分部数
                <input type="text" name="partAccordNum" lay-verify="required" placeholder="请输入整数" autocomplete="off" oninput="value=value.replace(/[^\d]/g,'')"
                       class="layui-input formData"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">质量保证资料：</label>
            <div class="layui-input-block">
                核查项数
                <input type="number" name="dataNum" lay-verify="required" placeholder="请输入整数" autocomplete="off" oninput="value=value.replace(/[^\d]/g,'')"
                       class="layui-input formData"/>
            </div>
            <div class="layui-input-block">
                符合要求项数
                <input type="text" name="dataAccordNum" lay-verify="required" placeholder="请输入整数" autocomplete="off" oninput="value=value.replace(/[^\d]/g,'')"
                       class="layui-input formData"/>
            </div>
            <div class="layui-input-block">
                经鉴定符合要求项数
                <input type="text" name="dataIdentifyNum" lay-verify="required" placeholder="请输入整数" autocomplete="off" oninput="value=value.replace(/[^\d]/g,'')"
                       class="layui-input formData"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">观感质量评价：</label>
            <div class="layui-input-block">
                <input class="formData" type="radio" name="appeQuality" value="1" title="好">
                <input class="formData" type="radio" name="appeQuality" value="2" title="一般">
                <input class="formData" type="radio" name="appeQuality" value="3" title="差">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">存在问题：</label>
            <div class="layui-input-block">
                <input type="text" name="problems" lay-verify="required" placeholder="请输入" autocomplete="off"
                       class="layui-input formData"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">审查结论：</label>
            <div class="layui-input-block">
                <input type="text" name="evalConclusion" lay-verify="required" placeholder="请输入" autocomplete="off"
                       class="layui-input formData"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">建设单位负责人：</label>
            <div class="layui-input-block">
                <input type="text" name="buildCorpResponsibleUserId" lay-verify="required" placeholder="请输入" autocomplete="off"
                       class="layui-input formData"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">日期：</label>
            <div class="layui-input-block">
                <input type="text" id="evalDate" name="evalDate" lay-verify="required" placeholder="请输入" autocomplete="off"
                       class="layui-input formData"/>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" src="/lib/layui/layui.js"></script>
<script src="/static/js/main.js"></script>
<!--<script type="text/javascript" src="../../../statics/js/sys/editDict.js"  charset="utf-8"></script>-->
<script>
    layui.use(['form', 'sessionFun', 'configure', 'configureCom', 'ztree', 'laydate'], function () {
        window.$ = layui.$;
        var form = layui.form;
        var configure = layui.configure;
        //ztree = layui.ztree;
        var configureCom = layui.configureCom;
        var sessionFun = layui.sessionFun;
        var laydate = layui.laydate;
        var listData = sessionFun.get(configure.SESSION_LIST_DATA);

        var evalDate  = '';

        // 赋值
        if(listData){
            form.val('formData', listData);
            evalDate = listData.evalDate;
        }



        laydate.render({
            elem: '#evalDate',
            type: 'date',
            value: (evalDate)?evalDate:new Date()
        });

        form.render();

    });

    function getData() {
        var data = {};

        $('.formData').each(function (index, item) {
            var key = $(item).attr('name');
            var type = $(item).attr('type');
            if(type=='radio'){
                data[key] = $("input[name='"+key+"']:checked").val();
            }else{
                data[key] = $(item).val();
            }

        });
        return data;
    }
</script>
</body>
</html>
